package com.youlai.boot.system.model.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 预售票数据表单对象
 *
 * @author 李文兵
 * @since 2025-06-29 17:29
 */
@Getter
@Setter
@Schema(description = "预售票数据表单对象")
public class SpotTicketForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Long id;

    @Schema(description = "旅行社Id")
    private Long deptId;

    @Schema(description = "旅行社名称")
    @Size(max=64, message="旅行社名称长度不能超过64个字符")
    private String deptName;

    @Schema(description = "分类Id")
    private Long categoryId;

    @Schema(description = "分类名称")
    @Size(max=64, message="分类名称长度不能超过64个字符")
    private String categoryName;

    @Schema(description = "预售数量")
    @Min(value=1, message="预售数量必须大于0")
    @NotNull(message = "预售数量不能为空")
    @Max(value=99999999, message="预售数量不能大于99999999")
    private Integer num;

    @Schema(description = "录入人Id")
    private Long recordBy;

    @Schema(description = "录入人")
    @Size(max=64, message="录入人长度不能超过64个字符")
    private String recordUserName;

    @Schema(description = "录入时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime recordTime;

    @Schema(description = "审核人Id")
    private Long auditBy;

    @Schema(description = "审核人")
    @Size(max=64, message="审核人长度不能超过64个字符")
    private String auditUserName;

    @Schema(description = "审核时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime auditTime;

    @Schema(description = "审核结果0未审核1审核中2审核通过3审核拒绝")
    private Integer auditResult;

    @Schema(description = "审核意见")
    @Size(max=512, message="审核意见长度不能超过512个字符")
    private String remark;


}
